namespace EduModel
{
    using System;
    using System.Data.Entity;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Linq;

    public partial class EduContext : DbContext
    {
        public EduContext()
            : base("name=EduContext")
        {
        }

        public virtual DbSet<C_Exe> C_Exe { get; set; }
        public virtual DbSet<C_Paper> C_Paper { get; set; }
        public virtual DbSet<C_PaperExe> C_PaperExe { get; set; }
        public virtual DbSet<C_Test> C_Test { get; set; }
        public virtual DbSet<C_TestError> C_TestError { get; set; }
        public virtual DbSet<C_TestList> C_TestList { get; set; }
        public virtual DbSet<M_MathExercise> M_MathExercise { get; set; }
        public virtual DbSet<M_MathExeType> M_MathExeType { get; set; }
        public virtual DbSet<M_MathHomeWork> M_MathHomeWork { get; set; }
        public virtual DbSet<M_MathHomeWorkReceive> M_MathHomeWorkReceive { get; set; }
        public virtual DbSet<M_MathHomeWorkResult> M_MathHomeWorkResult { get; set; }
        public virtual DbSet<M_MathLevel> M_MathLevel { get; set; }
        public virtual DbSet<R_LiveCourse> R_LiveCourse { get; set; }
        public virtual DbSet<R_LiveRoom> R_LiveRoom { get; set; }
        public virtual DbSet<R_MatCheckList> R_MatCheckList { get; set; }
        public virtual DbSet<R_MatCollection> R_MatCollection { get; set; }
        public virtual DbSet<R_MatFile> R_MatFile { get; set; }
        public virtual DbSet<R_MatFileExt> R_MatFileExt { get; set; }
        public virtual DbSet<R_MatForum> R_MatForum { get; set; }
        public virtual DbSet<R_MatSchoolFTP> R_MatSchoolFTP { get; set; }
        public virtual DbSet<R_MatSetCheck> R_MatSetCheck { get; set; }
        public virtual DbSet<R_MatTeaCheck> R_MatTeaCheck { get; set; }
        public virtual DbSet<R_MatTeaIsCheck> R_MatTeaIsCheck { get; set; }
        public virtual DbSet<R_MatType> R_MatType { get; set; }
        public virtual DbSet<T_App> T_App { get; set; }
        public virtual DbSet<T_AppTicket> T_AppTicket { get; set; }
        public virtual DbSet<T_Area> T_Area { get; set; }
        public virtual DbSet<T_AwardMat> T_AwardMat { get; set; }
        public virtual DbSet<T_AwardRecord> T_AwardRecord { get; set; }
        public virtual DbSet<T_CashMat> T_CashMat { get; set; }
        public virtual DbSet<T_CashRecord> T_CashRecord { get; set; }
        public virtual DbSet<T_City> T_City { get; set; }
        public virtual DbSet<T_Class> T_Class { get; set; }
        public virtual DbSet<T_ClassGroup> T_ClassGroup { get; set; }
        public virtual DbSet<T_ClassGroupStudent> T_ClassGroupStudent { get; set; }
        public virtual DbSet<T_ClassStudent> T_ClassStudent { get; set; }
        public virtual DbSet<T_ClassTerm> T_ClassTerm { get; set; }
        public virtual DbSet<T_FileType> T_FileType { get; set; }
        public virtual DbSet<T_Group> T_Group { get; set; }
        public virtual DbSet<T_Journalism> T_Journalism { get; set; }
        public virtual DbSet<T_KeyValue> T_KeyValue { get; set; }
        public virtual DbSet<T_Leave> T_Leave { get; set; }
        public virtual DbSet<T_MakeList> T_MakeList { get; set; }
        public virtual DbSet<T_MaxId> T_MaxId { get; set; }
        public virtual DbSet<T_Msg> T_Msg { get; set; }
        public virtual DbSet<T_MsgFile> T_MsgFile { get; set; }
        public virtual DbSet<T_MsgReceive> T_MsgReceive { get; set; }
        public virtual DbSet<T_MsgReply> T_MsgReply { get; set; }
        public virtual DbSet<T_MsgReplyFile> T_MsgReplyFile { get; set; }
        public virtual DbSet<T_New> T_New { get; set; }
        public virtual DbSet<T_PayOrder> T_PayOrder { get; set; }
        public virtual DbSet<T_Post> T_Post { get; set; }
        public virtual DbSet<T_PostAgree> T_PostAgree { get; set; }
        public virtual DbSet<T_PostFile> T_PostFile { get; set; }
        public virtual DbSet<T_PostReply> T_PostReply { get; set; }
        public virtual DbSet<T_PostReplyFile> T_PostReplyFile { get; set; }
        public virtual DbSet<T_Prov> T_Prov { get; set; }
        public virtual DbSet<T_Recipes> T_Recipes { get; set; }
        public virtual DbSet<T_Recipes_Img> T_Recipes_Img { get; set; }
        public virtual DbSet<T_RecrPlan> T_RecrPlan { get; set; }
        public virtual DbSet<T_Role> T_Role { get; set; }
        public virtual DbSet<T_School> T_School { get; set; }
        public virtual DbSet<T_School_WorkFun> T_School_WorkFun { get; set; }
        public virtual DbSet<T_SchoolStyle> T_SchoolStyle { get; set; }
        public virtual DbSet<T_SchoolStylePhoto> T_SchoolStylePhoto { get; set; }
        public virtual DbSet<T_SchoolType> T_SchoolType { get; set; }
        public virtual DbSet<T_SchoolTypeStage> T_SchoolTypeStage { get; set; }
        public virtual DbSet<T_ScoreRecord> T_ScoreRecord { get; set; }
        public virtual DbSet<T_ScoreRecordUser> T_ScoreRecordUser { get; set; }
        public virtual DbSet<T_ScoreType> T_ScoreType { get; set; }
        public virtual DbSet<T_Stand> T_Stand { get; set; }
        public virtual DbSet<T_StandRecord> T_StandRecord { get; set; }
        public virtual DbSet<T_StarBabyMsg> T_StarBabyMsg { get; set; }
        public virtual DbSet<T_StarBabyMsgFile> T_StarBabyMsgFile { get; set; }
        public virtual DbSet<T_StarBabyMsgReceive> T_StarBabyMsgReceive { get; set; }
        public virtual DbSet<T_StarBabyType> T_StarBabyType { get; set; }
        public virtual DbSet<T_StuContacts> T_StuContacts { get; set; }
        public virtual DbSet<T_Synopsis> T_Synopsis { get; set; }
        public virtual DbSet<T_TeachClass> T_TeachClass { get; set; }
        public virtual DbSet<T_TeachSet> T_TeachSet { get; set; }
        public virtual DbSet<T_TeaContacts> T_TeaContacts { get; set; }
        public virtual DbSet<T_TeaGroup> T_TeaGroup { get; set; }
        public virtual DbSet<T_TeaGroup_Member> T_TeaGroup_Member { get; set; }
        public virtual DbSet<T_Term> T_Term { get; set; }
        public virtual DbSet<T_TreeGrade> T_TreeGrade { get; set; }
        public virtual DbSet<T_TreeGradeStudy> T_TreeGradeStudy { get; set; }
        public virtual DbSet<T_TreeLesson> T_TreeLesson { get; set; }
        public virtual DbSet<T_TreeStage> T_TreeStage { get; set; }
        public virtual DbSet<T_TreeStudy> T_TreeStudy { get; set; }
        public virtual DbSet<T_TreeUnit> T_TreeUnit { get; set; }
        public virtual DbSet<T_TreeVersion> T_TreeVersion { get; set; }
        public virtual DbSet<T_TreeVolume> T_TreeVolume { get; set; }
        public virtual DbSet<T_TreeVolumeGrade> T_TreeVolumeGrade { get; set; }
        public virtual DbSet<T_User> T_User { get; set; }
        public virtual DbSet<T_User_Card> T_User_Card { get; set; }
        public virtual DbSet<T_UserInvite> T_UserInvite { get; set; }
        public virtual DbSet<T_WeekPlan> T_WeekPlan { get; set; }
        public virtual DbSet<T_WeekPlan_Img> T_WeekPlan_Img { get; set; }
        public virtual DbSet<T_WorkList> T_WorkList { get; set; }
        public virtual DbSet<V_UserVote> V_UserVote { get; set; }
        public virtual DbSet<V_VoteList> V_VoteList { get; set; }
        public virtual DbSet<V_VoteOption> V_VoteOption { get; set; }
        public virtual DbSet<W_Chap> W_Chap { get; set; }
        public virtual DbSet<W_Course> W_Course { get; set; }
        public virtual DbSet<W_CourseTeacher> W_CourseTeacher { get; set; }
        public virtual DbSet<W_FileStar> W_FileStar { get; set; }
        public virtual DbSet<W_Sect> W_Sect { get; set; }
        public virtual DbSet<W_SmallFile> W_SmallFile { get; set; }
        public virtual DbSet<W_Time> W_Time { get; set; }
        public virtual DbSet<W_TimeFile> W_TimeFile { get; set; }
        public virtual DbSet<Y_Book> Y_Book { get; set; }
        public virtual DbSet<Y_BookExe> Y_BookExe { get; set; }
        public virtual DbSet<Y_BookFile> Y_BookFile { get; set; }
        public virtual DbSet<Y_BookGrade> Y_BookGrade { get; set; }
        public virtual DbSet<Y_BookGradeLevel> Y_BookGradeLevel { get; set; }
        public virtual DbSet<Y_ReadLevel> Y_ReadLevel { get; set; }
        public virtual DbSet<Y_ReadScoreRecord> Y_ReadScoreRecord { get; set; }
        public virtual DbSet<Y_Rush> Y_Rush { get; set; }
        public virtual DbSet<Y_RushResult> Y_RushResult { get; set; }
        public virtual DbSet<Y_Sport> Y_Sport { get; set; }
        public virtual DbSet<Y_SportExe> Y_SportExe { get; set; }
        public virtual DbSet<Y_SportResult> Y_SportResult { get; set; }
        public virtual DbSet<Y_SportUser> Y_SportUser { get; set; }
        public virtual DbSet<Y_Test> Y_Test { get; set; }
        public virtual DbSet<Y_TestExe> Y_TestExe { get; set; }
        public virtual DbSet<Y_TestGrade> Y_TestGrade { get; set; }
        public virtual DbSet<Y_TestResultList> Y_TestResultList { get; set; }
        public virtual DbSet<Y_TestResultMain> Y_TestResultMain { get; set; }
        public virtual DbSet<Y_Think> Y_Think { get; set; }
        public virtual DbSet<Y_ThinkReplay> Y_ThinkReplay { get; set; }
        public virtual DbSet<Y_UserLevel> Y_UserLevel { get; set; }
        public virtual DbSet<T_AppModelOpen> T_AppModelOpen { get; set; }
        public virtual DbSet<T_ManageSchool> T_ManageSchool { get; set; }
        public virtual DbSet<T_SchoolBackImg> T_SchoolBackImg { get; set; }
        public virtual DbSet<T_WeekPlanForClass> T_WeekPlanForClass { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<C_Exe>()
                .Property(e => e.RightAn)
                .IsUnicode(false);

            modelBuilder.Entity<C_Test>()
                .Property(e => e.ScoreSum)
                .HasPrecision(8, 2);

            modelBuilder.Entity<C_TestList>()
                .Property(e => e.MyAn)
                .IsUnicode(false);

            modelBuilder.Entity<M_MathHomeWorkReceive>()
                .HasOptional(e => e.M_MathHomeWorkReceive1)
                .WithRequired(e => e.M_MathHomeWorkReceive2);

            modelBuilder.Entity<R_MatFileExt>()
                .Property(e => e.FileExtName)
                .IsUnicode(false);

            modelBuilder.Entity<R_MatFileExt>()
                .Property(e => e.FileTypeName)
                .IsUnicode(false);

            modelBuilder.Entity<R_MatType>()
                .Property(e => e.CoverImg)
                .IsUnicode(false);

            modelBuilder.Entity<T_App>()
                .Property(e => e.AppCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_AppTicket>()
                .Property(e => e.AppTicket)
                .IsUnicode(false);

            modelBuilder.Entity<T_Area>()
                .Property(e => e.AreaCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_Area>()
                .Property(e => e.CityCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_Area>()
                .Property(e => e.SysUrl)
                .IsUnicode(false);

            modelBuilder.Entity<T_AwardMat>()
                .Property(e => e.Sore)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_AwardRecord>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_CashMat>()
                .Property(e => e.MatScore)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_CashMat>()
                .Property(e => e.MatNum)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_CashRecord>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_City>()
                .Property(e => e.CityCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_City>()
                .Property(e => e.ProvCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_City>()
                .Property(e => e.SysUrl)
                .IsUnicode(false);

            modelBuilder.Entity<T_Class>()
                .Property(e => e.ClassName)
                .IsUnicode(false);

            modelBuilder.Entity<T_FileType>()
                .Property(e => e.FileExtName)
                .IsUnicode(false);

            modelBuilder.Entity<T_FileType>()
                .Property(e => e.FileTypeName)
                .IsUnicode(false);

            modelBuilder.Entity<T_Leave>()
                .Property(e => e.Reason)
                .IsUnicode(false);

            modelBuilder.Entity<T_Leave>()
                .Property(e => e.UserName)
                .IsUnicode(false);

            modelBuilder.Entity<T_MaxId>()
                .Property(e => e.BuName)
                .IsUnicode(false);

            modelBuilder.Entity<T_PayOrder>()
                .Property(e => e.OrderNo)
                .IsUnicode(false);

            modelBuilder.Entity<T_PayOrder>()
                .Property(e => e.PayPrice)
                .HasPrecision(8, 2);

            modelBuilder.Entity<T_PayOrder>()
                .Property(e => e.TradeNo)
                .IsUnicode(false);

            modelBuilder.Entity<T_PayOrder>()
                .Property(e => e.Phone)
                .IsUnicode(false);

            modelBuilder.Entity<T_Prov>()
                .Property(e => e.ProvCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_Prov>()
                .Property(e => e.SysUrl)
                .IsUnicode(false);

            modelBuilder.Entity<T_School>()
                .Property(e => e.SchoolCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_School>()
                .Property(e => e.LinkQQ)
                .IsUnicode(false);

            modelBuilder.Entity<T_School>()
                .Property(e => e.LinkPhone)
                .IsUnicode(false);

            modelBuilder.Entity<T_SchoolStyle>()
                .Property(e => e.Title)
                .IsUnicode(false);

            modelBuilder.Entity<T_ScoreRecord>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_ScoreRecord>()
                .Property(e => e.ScoreCur)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_ScoreRecordUser>()
                .Property(e => e.ScorePlus)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_Stand>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_StandRecord>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_StarBabyMsg>()
                .Property(e => e.UserId)
                .IsFixedLength();

            modelBuilder.Entity<T_StarBabyType>()
                .Property(e => e.StarTypeName)
                .IsUnicode(false);

            modelBuilder.Entity<T_StuContacts>()
                .Property(e => e.StuName)
                .IsUnicode(false);

            modelBuilder.Entity<T_StuContacts>()
                .Property(e => e.FTelPhone)
                .IsUnicode(false);

            modelBuilder.Entity<T_StuContacts>()
                .Property(e => e.MTelPhone)
                .IsUnicode(false);

            modelBuilder.Entity<T_StuContacts>()
                .Property(e => e.OTelPhone)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaContacts>()
                .Property(e => e.TeaName)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaContacts>()
                .Property(e => e.TeaPost)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaContacts>()
                .Property(e => e.Tel)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaContacts>()
                .Property(e => e.Phone)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaGroup>()
                .Property(e => e.GroupName)
                .IsUnicode(false);

            modelBuilder.Entity<T_TeaGroup>()
                .Property(e => e.AreaCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.LoginName)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.Password)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.RealName)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.CardNo)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.Phone)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.Email)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.ScorePlus)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_User>()
                .Property(e => e.ScoreSub)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_User>()
                .Property(e => e.ScoreCur)
                .HasPrecision(8, 1);

            modelBuilder.Entity<T_User>()
                .Property(e => e.QrCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.HeadImg)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.Phone1)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.Phone2)
                .IsUnicode(false);

            modelBuilder.Entity<T_User>()
                .Property(e => e.AreaCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_User_Card>()
                .Property(e => e.CardCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_UserInvite>()
                .Property(e => e.InviteCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_WorkList>()
                .Property(e => e.CardCode)
                .IsUnicode(false);

            modelBuilder.Entity<T_WorkList>()
                .Property(e => e.Longitude)
                .IsUnicode(false);

            modelBuilder.Entity<T_WorkList>()
                .Property(e => e.Latitude)
                .IsUnicode(false);

            modelBuilder.Entity<T_WorkList>()
                .Property(e => e.Address)
                .IsUnicode(false);

            modelBuilder.Entity<W_Course>()
                .Property(e => e.CoursePrice)
                .HasPrecision(10, 2);

            modelBuilder.Entity<Y_BookExe>()
                .Property(e => e.RightAn)
                .IsUnicode(false);

            modelBuilder.Entity<Y_BookGradeLevel>()
                .Property(e => e.BookId)
                .IsFixedLength();

            modelBuilder.Entity<Y_BookGradeLevel>()
                .Property(e => e.GradeLevel)
                .IsFixedLength();

            modelBuilder.Entity<Y_ReadLevel>()
                .Property(e => e.ScoreBegin)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_ReadLevel>()
                .Property(e => e.ScoreEnd)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_ReadScoreRecord>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_ReadScoreRecord>()
                .Property(e => e.ScoreCur)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_Rush>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_RushResult>()
                .Property(e => e.MyAn)
                .IsUnicode(false);

            modelBuilder.Entity<Y_SportResult>()
                .Property(e => e.MyAn)
                .IsUnicode(false);

            modelBuilder.Entity<Y_SportUser>()
                .Property(e => e.Score)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_Test>()
                .Property(e => e.FullScore)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_TestResultList>()
                .Property(e => e.MyAn)
                .IsUnicode(false);

            modelBuilder.Entity<Y_TestResultMain>()
                .Property(e => e.TestScore)
                .HasPrecision(8, 1);

            modelBuilder.Entity<Y_UserLevel>()
                .Property(e => e.ReadScore)
                .HasPrecision(8, 1);
        }
    }
}
